//
//  Yueyoulist.m
//  MiaoTu
//
//  Created by dllo on 16/09/20
//  Copyright (c) dllo. All rights reserved.
//

#import "Yueyoulist.h"
#import "Piclist.h"
#import "UserInfo.h"
#import "Assemblingplace.h"

@implementation Yueyoulist

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"AssemblingPlace"]) {
        _AssemblingPlace = [Assemblingplace modelWithDic:value];
    }
    if ([key isEqualToString:@"ReplyList"]) {
        NSMutableArray<UserInfo *> *replyList = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            UserInfo *user = [UserInfo modelWithDic:dic];
            [replyList addObject:user];
        }
        _ReplyList = replyList;
    }
    if ([key isEqualToString:@"JoinList"]) {
        NSMutableArray<UserInfo *> *joinList = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            UserInfo *user = [UserInfo modelWithDic:dic];
            [joinList addObject:user];
        }
        _JoinList = joinList;
    }
    if ([key isEqualToString:@"LikeList"]) {
        NSMutableArray<UserInfo *> *likeList = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            UserInfo *user = [UserInfo modelWithDic:dic];
            [likeList addObject:user];
        }
        _LikeList = likeList;
    }
    
    if ([key isEqualToString:@"PicList"]) {
        NSMutableArray<Piclist *> *replyList = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            Piclist *user = [Piclist modelWithDic:dic];
            [replyList addObject:user];
        }
        _PicList = replyList;
    }
    
}

+ (NSDictionary *)objectClassInArray{
    return @{@"PicList" : [Piclist class], @"ReplyList" : [UserInfo class]};
}

@end
